#include "mainwindow.h"
#include <QApplication>
#include <QLocale>
#include <QTranslator>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>

#include <QtWebSockets/QWebSocketServer>
#include <QtWebSockets/QWebSocket>
#include <QObject>
#include <QTcpServer>
#include "QTcpServer"


#include <Qt3DCore/QEntity>
#include <Qt3DExtras/Qt3DWindow>
#include <Qt3DExtras/QForwardRenderer>
#include <Qt3DRender/QCamera>
#include"client.h"

#include <QGuiApplication>


#include <Qt3DExtras/Qt3DWindow>
#include <Qt3DCore/QEntity>
#include <Qt3DCore/QTransform>
#include <Qt3DRender/QMesh>
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);




    QTranslator translator;
    const QStringList uiLanguages = QLocale::system().uiLanguages();
    for (const QString &locale : uiLanguages) {
        const QString baseName = "untitled5_" + QLocale(locale).name();
        if (translator.load(":/i18n/" + baseName)) {
            a.installTranslator(&translator);
            break;
        }
    }
    qDebug() << "Available serial ports:";
            foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) {
            qDebug() << "Port:" << info.portName();
            qDebug() << "Description:" << info.description();
            qDebug() << "Manufacturer:" << info.manufacturer();
            qDebug() << "System Location:" << info.systemLocation();
            qDebug() << "测试成功";
            qDebug() << "测试21111";
            qDebug() << "-------------------------------------";

        }
    const quint16 port = 12345; // Adjust the port number as needed


    MainWindow w;
    w.show();
    // client cli;
    // cli.show();
    return a.exec();
}
